package com.example.demo.model.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.model.UserInfo;
import com.example.demo.model.command.UserInfoSaveCommand;
import com.example.demo.model.command.UserInfoUpdateCommand;
import com.example.demo.model.resp.UserInfoDetailResp;
import com.example.demo.model.resp.UserInfoPageResp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
* <p>
    * 系统用户表 转换器
    * </p>
*
* @author chenzl
* @since 2023-10-11
*/
@Mapper
public interface UserInfoConverter {
    UserInfoConverter INSTANCE = Mappers.getMapper(UserInfoConverter.class);

    UserInfo convert(UserInfoSaveCommand source);

    UserInfo convert(UserInfoUpdateCommand source);

    UserInfoDetailResp convert2DetailResp(UserInfo source);

    Page<UserInfoPageResp> convert2PageResp(Page<UserInfo> source);
}
